package com.yss.sofa.report.engine;

import org.apache.commons.lang3.StringUtils;
//import org.osgi.framework.BundleActivator;
//import org.osgi.framework.BundleContext;
//
//import com.yss.sofa.framework.util.FileUtil;
//import com.yss.sofa.framework.util.SOFAEnvionmentUtil;
import com.yss.sofa.report.engine.util.PdfUtil;
import com.yss.sofa.report.engine.util.ScriptUtil;
import com.yss.sofa.report.engine.util.WordUtil;

public class Activator /*implements BundleActivator*/{
	public static String CUSTOM_FORM_PATH;
	public static String FORM_PATH;
	public static String FONT_PATH;
	/*public void start(BundleContext context) throws Exception {
		FORM_PATH=FileUtil.toFileURL(context.getBundle().getResource("/freemarker")).getPath();
		String report_home=System.getenv("REPORT_HOME");
		if(StringUtils.isEmpty(report_home)){
			CUSTOM_FORM_PATH=SOFAEnvionmentUtil.getSOFAHomePath()+"/report/.form/";
		} else {
			CUSTOM_FORM_PATH=report_home+"/.form/";
		}
		FONT_PATH=FileUtil.toFileURL(context.getBundle().getResource("/font")).getPath();
		System.out.println("*****************************************");
		System.out.println(FORM_PATH);
		System.out.println(CUSTOM_FORM_PATH);
		System.out.println(FONT_PATH);
		PdfUtil.init();
		WordUtil.init();
		System.out.println("*****************************************");
	}

	public void stop(BundleContext context) throws Exception {
		System.out.println("*****************************************");
		System.out.println("清空Groovy Classes");
		ScriptUtil.clearAll();
		System.out.println("*****************************************");
	}*/

}